//ACV_Init_Client.sqf
#include "ACV_constantes.h"
#include "ACV_ID_main_dlg.h"
#include "ACV_ID_wp_dlg.h"
//Envoyé par le serveur pour signaler qu'un groupe a été créé
"ACV_NET_RefreshListUnits" addPublicVariableEventHandler {
	private ["_params","_varname","_action","_owner"];
	_params = _this select 1;
	_varname = _params select 0;
	_action = _params select 1;
	_owner = _params select 2;
	//diag_log format["CLIENT-> Recept  %1", _params];
	[_varname,_action,_owner] call ACV_FNCT_RefreshListUnits;
};
//Envoyé par le serveur pour signaler qu'un Object a été créé
"ACV_NET_RefreshListObjects" addPublicVariableEventHandler {
	private ["_params","_varname","_action","_owner"];
	_params = _this select 1;
	_varname = _params select 0;
	_action = _params select 1;
	_owner = _params select 2;
	[_varname,_action,_owner] call ACV_FNCT_RefreshListObjects;
};
[] execVM "R3F_ACV\Scripts\ACV_Init_Classes.sqf";
[] execVM "R3F_ACV\functions\functions_integrator.sqf";
sleep 2; /** Ne pas enlever **/
[] spawn {
	while {true} do {
		[] call ACV_FNCT_FillPlayer;
		sleep 30;
	};
};
[] call ACV_InitPlayer;
sleep 60;
[] spawn {
	while {true} do {
		if (ACV_User) then {
			private ["_array","_vehicle","_ACV_User_embedded"];
			_array = assignedVehicleRole player;
			if (count _array > 0) then {
				_vehicle = assignedVehicle player;
				_ACV_User_embedded = _vehicle getVariable "ACV_User_Embedded";
				if (isNil "_ACV_User_embedded") then {
					_vehicle addAction ["A.C.V" call R3F_FNCT_Red,"R3F_ACV\Scripts\show_main_dlg.sqf",[],-10,false,false,"","(player in _target) && ACV_User"];
					_vehicle setVariable ["ACV_User_Embedded",true];
				};
			};
			sleep 10;
		};
	};
};
sleep 60;
BIS_Effects_Burn = compile preprocessFile "R3F_ACV\Scripts\EFFECT_burn.sqf";